import request from '@/utils/request';

// GET POST PUT DELETE

// 用户登录 ,
export function login(params) {
	return request({
		url: '/users',
		method: 'GET',
		params,
	});
}

// 用户退出登录
export function loginOut(params) {
	return request({
		url: '/user/signOut',
		method: 'post',
		data: params,
	});
}

// 添加登录日志
export const addLoginLog = (data) =>
	request({
		url: '/loginlog',
		method: 'POST',
		data,
	});

// 查询登录日志
export const getLoginLog = () =>
	request({
		url: '/loginlog?_sort=logintime&_order=desc',
		method: 'GET',
	});
